package com.apexsoft.aas.ac.controller;

import com.apexsoft.aas.ac.AcSession;
import com.apexsoft.aas.ac.model.AuthUser;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author linqz
 * @date 10/11/2018
 */
@Controller
public class DemoController {


    @RequestMapping("/")
    @ResponseBody
    public String index() {
        return "index";
    }

    @RequestMapping("/session")
    @ResponseBody
    public AuthUser session(HttpServletRequest request, HttpServletResponse response) {
        AuthUser acUser = AcSession.getAcUser();
        return acUser;
    }
}
